# Maintainer: Noel Kuntze <noel.kuntze@thermi.consulting>
pkgname=py3-vici
pkgver=5.9.4
pkgrel=0
pkgdesc="Native Python interface for strongSwan's VICI protocol"
url="https://strongswan.org"
arch="noarch"
license="MIT"
depends="python3"
makedepends="automake autoconf py3-setuptools"
checkdepends="py3-pytest py3-tox"
source="https://github.com/strongswan/strongswan/releases/download/$pkgver/strongswan-$pkgver.tar.bz2
	use-sitepackages.patch
	"
builddir="$srcdir/strongswan-$pkgver"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--disable-defaults \
		--enable-python-eggs

	cd src/libcharon/plugins/vici/python
	make all
	python3 setup.py build
}

check() {
	make -C src/libcharon/plugins/vici/python check
}

package() {
	cd src/libcharon/plugins/vici/python/
	python3 setup.py install --root="$pkgdir" --optimize=1
}

sha512sums="
796356c1d5c1ad410f0ed944ab4a131076d26f120ec6fa57796fe4060b0741201199625883ddc9ebd8a7ad299495f073cec76a6780ebd8f375605aae16750cf3  strongswan-5.9.4.tar.bz2
4c53fb194339598c2d4226c152b2624550eac052498f52294202468c3dbf5108590f31326e2ca87ce833839ec2daf1ad991d83088e5388c0bcc5503507f7dae5  use-sitepackages.patch
"
